package customer

import (
	"context"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/remote/bigdata_remote"
	openSearchRepo "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/remote/opensearch_remote"
	pb "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/proto/micro_gfyx_oppty_service_proto/micro-gfyx-oppty-service/business_opportunity"
)

type CustomerServiceIface interface {
	// SearchCustomerList 找客户列表
	SearchCustomerList(ctx context.Context, request *pb.SearchCustomerListRequest) (*pb.SearchCustomerListResponse, error)
	//GetCustomerDetail 找客户详情
	GetCustomerDetail(ctx context.Context, request *pb.GetCustomerDetailRequest) (*pb.GetCustomerDetailResponse, error)
	// GetCustomerDetailBatch 通过社会信用代码批量获取客户详细
	GetCustomerDetailBatch(ctx context.Context, organizingCodes []string) ([]*openSearchRepo.CustomerDetail, error)
	// GetSupplierProject 获取供应商合作案例
	GetSupplierProject(ctx context.Context, request *pb.GetSupplierProjectRequest) (*pb.GetSupplierProjectResponse, error)
	// GetFeed 获取动态
	GetFeed(ctx context.Context, request *pb.GetFeedRequest) (*pb.GetFeedResponse, error)
	// GetInvestCompany 获取股权公司
	GetInvestCompany(ctx context.Context, request *pb.GetInvestCompanyRequest) (*pb.GetInvestCompanyResponse, error)
	// FuzzySearch 模糊搜索公司名
	FuzzySearch(ctx context.Context, request *pb.FuzzySearchCustomerRequest) (*pb.FuzzySearchCustomerResponse, error)

	GetCompanyTarget(ctx context.Context, companyName []string) []*bigdata_remote.GetCompanyTargetItem

	// GetCustomerZxList 企业风险相关
	GetCustomerZxList(ctx context.Context, request *pb.GetCustomerRiskCommonRequest) (*pb.GetCustomerZxListResponse, error)
	GetCustomerCourtRegister(ctx context.Context, request *pb.GetCustomerRiskCommonRequest) (*pb.GetCustomerCourtRegisterResponse, error)
	GetCustomerLawSuit(ctx context.Context, request *pb.GetCustomerRiskCommonRequest) (*pb.GetCustomerLawSuitResponse, error)
	GetCustomerTaxIllegal(ctx context.Context, request *pb.GetCustomerRiskCommonRequest) (*pb.GetCustomerTaxIllegalResponse, error)
	GetCustomerRiskCount(ctx context.Context, request *pb.GetCustomerRiskCountRequest) (*pb.GetCustomerRiskCountResponse, error)

	// GetCustomerScore 获取好客户得分
	GetCustomerScore(ctx context.Context, request *pb.GetCustomerScoreRequest) ([]*pb.GetCustomerScoreResponse, error)
	// GetCustomerCommencePermitList 获取客户详情-开工列表
	GetCustomerCommencePermitList(ctx context.Context, request *pb.GetCustomerCommencePermitRequest) (*pb.GetCustomerCommencePermitResponse, error)

	// GetExportCustomerTotal QueryExportCustomerBatchData 导出找客户列表需要实现这两个方法
	GetExportCustomerTotal(ctx context.Context, condition interface{}) (total int64, err error)
	QueryExportCustomerBatchData(ctx context.Context, condition interface{}, batchNum, batchSize int32) (rowTitle []string, rowData [][]string, err error)

	// GetExportSupplierProjectTotal QueryExportSupplierProjectBatchData 导出客户详情的合作案例数据
	GetExportSupplierProjectTotal(ctx context.Context, condition interface{}) (total int64, err error)
	QueryExportSupplierProjectBatchData(ctx context.Context, condition interface{}, batchNum, batchSize int32) (rowTitle []string, rowData [][]string, err error)
}
